import {Router} from 'vue-router';

export const enum RouteNameEnum {
  home = 'home',
  login = 'login',
  r404 = '404',
  r401 = '401',
  test = 'test',
  personalCenter = 'personalCenter',
}
export interface CCRoute {
  routeName?: RouteNameEnum;
  params?: any;
  query?: any;
}
export class CCRouter {
  public router!: Router;
  public push(route: CCRoute) {
    return this.router.push({name: route.routeName, params: route.params, query: route.query});
  }
  public replace(route: CCRoute) {
    return this.router.replace({name: route.routeName, params: route.params, query: route.query});
  }
}
